package com.powernode.feign;

import com.powernode.domain.MemberAddr;
import com.powernode.model.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 订单业务模块调用会员业务模块的feign接口
 */
@FeignClient(value = "member-service")
public interface OrderMemberFeign {

    //////////////////// 会员收货地址 远程接口 ////////////////////////////////

    @GetMapping("p/address/getMemberAddrById")
    public Result<MemberAddr> getMemberAddrById(@RequestParam Long id);

    @GetMapping("p/address/getMemberDefaultAddrByOpenId")
    public Result<MemberAddr> getMemberDefaultAddrByOpenId(@RequestParam String openId, @RequestParam Long addrId);


    //////////////////// 会员 远程接口 ////////////////////////////////
    @GetMapping("admin/user/getMemberNickNameByOpenId")
    public Result<String> getMemberNickNameByOpenId(@RequestParam String openId);

}
